package com.chj.chuji.tijie01;

public class OperationSequence {
	public static void main(String[] args) {
//		Scanner sc = new Scanner(System.in);
//		int n = sc.nextInt();
//		int[] a = new int[n];
//		for (int i = 0; i < n; i++) {
//			a[i] = sc.nextInt();
//		}

		int n = 5;
		int[] a = new int[] { 1, 2, 3, 4, 5 };
		for (int i = n - 1; i >= 0; i -= 2) {
			System.out.printf("%d ", a[i]);
		}
		for (int i = n % 2; i <= n - 2; i += 2) {
			System.out.printf("%d ", a[i]);
		}
	}
}
